package com.gykfbxxh.imovie.custom.net;


import java.util.HashMap;

/**
 * Created by xuxinghai on 2016/8/4.
 *
 *  HashMap的包装类,将所有put的value进行utf-8的编码
 */
public class ParamMap extends HashMap<String,String>{



    public String putEncode(String key, String value) {
        return super.put(key, value);

//        if(TextUtils.isEmpty(value)){
//            return super.put(key, value);
//        }
//        String encodeVal;
//        try {
//            encodeVal= URLEncoder.encode(value,"utf-8");
//        } catch (UnsupportedEncodingException e) {
//            e.printStackTrace();
//            encodeVal = "";
//        }catch (NullPointerException e) {
//            e.printStackTrace();
//            encodeVal = "";
//        }
//        return super.put(key, encodeVal);
    }

}